import React, { Component } from 'react'

export default class Son extends Component {
  render() {

    click = () => {

    // 调用父组件的方法并传值过去
      this.props.change('我是子组件传出来的值')
    }

    return (
      <div>
        <button onClick={this.click}>点我</button>
      </div>
    )
  }
}
